﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _16_Jan_Practice
{
    class Customer
    {
        Bank bank = new Bank();
        private string firstName;
        private string lastName;
        private int accountNumber;
        private decimal cash;

        public void EnterCredential ()
        {
            Console.WriteLine("Enter your first name");
            firstName = Console.ReadLine();
            Console.WriteLine("Enter your last name");
            lastName = Console.ReadLine();
            
        }
        public void ShowCustomerInfo()
        {
            Console.WriteLine("{0} {1}", firstName, lastName);
        }
        public void SetMoney ()
        {
            Console.WriteLine("Enter ID");
            accountNumber = Int32.Parse(Console.ReadLine());
            bank.GetMoney(accountNumber);
        }
        public void OpenAccount()
        {
            bank.CreateAccount();
        }
        public void ShowBalance()
        {
            Console.WriteLine("Enter ID");
            accountNumber = Int32.Parse(Console.ReadLine());
            bank.ShowMoneyOnAccount(accountNumber);
        }
        public void CloseAccount()
        {
            Console.WriteLine("Enter ID");
            accountNumber = Int32.Parse(Console.ReadLine());
            cash = bank.GetAllMoney(accountNumber);
            Console.WriteLine("You get {0}$.", cash);
            bank.DeleteAccount(accountNumber);
        }
        public void TakeAllMoney()
        {
            Console.WriteLine("Enter ID");
            accountNumber = Int32.Parse(Console.ReadLine());
            cash = bank.GetAllMoney(accountNumber);
            Console.WriteLine("You have {0}$", cash);
        }
    }
}
